// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.SysFile;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * ProductIngredients
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "product_ingredients", autoResultMap = true)
@Schema(title = "关联辅料表")
public class ProductIngredients implements Serializable {

  /**
   * 所属辅料管理
   */
  @TableField(value = "`accessories_id`")
  @JoinField(Accessories.class)
  @Schema(title = "所属辅料管理")
  private Long accessoriesId;

  /**
   * 所属产品
   */
  @TableField(value = "`product_id`")
  @JoinField(Product.class)
  @Schema(title = "所属产品")
  private Long productId;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 产品图片
   */
  @TableField(value = "`pic_url`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "产品图片")
  private List<SysFile> picUrl;

  /**
   * 产品SKU
   */
  @TableField(value = "`product_sku`")
  @Schema(title = "产品SKU")
  private String productSku;

  /**
   * 产品名称
   */
  @TableField(value = "`product_name`")
  @Schema(title = "产品名称")
  private String productName;

  /**
   * 辅料名称
   */
  @TableField(value = "`accessories_name`")
  @Schema(title = "辅料名称")
  private String accessoriesName;

  /**
   * 辅料Sku
   */
  @TableField(value = "`accessories_sku`")
  @Schema(title = "辅料Sku")
  private String accessoriesSku;

  /**
   * 单位成本
   */
  @TableField(value = "`purchase_cost`")
  @Schema(title = "单位成本")
  private java.math.BigDecimal purchaseCost;

  /**
   * 主料数量
   */
  @TableField(value = "`accessories_quantity`")
  @Schema(title = "主料数量")
  private Integer accessoriesQuantity;

  /**
   * 辅料数量
   */
  @TableField(value = "`produc_quantity`")
  @Schema(title = "辅料数量")
  private Integer producQuantity;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "备注")
  private String remark;
}
